-- GENERATED SPELL FOR [Warden Belamoore] --


function spell0_2415(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(20828,pUnit)
pUnit:RegisterEvent('Sorts_2415', 8250, 1)
end

function spell1_2415(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2415', 3000, 1)
end

function spell2_2415(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(13323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2415', 9500, 1)
end

function Sorts_2415(pUnit, Event)
local choix_sorts_2415 = math.random(0, 2)
if choix_sorts_2415 == 0 then
pUnit:RegisterEvent('spell0_2415', 1, 1)
end
if choix_sorts_2415 == 1 then
pUnit:RegisterEvent('spell1_2415', 1, 1)
end
if choix_sorts_2415 == 2 then
pUnit:RegisterEvent('spell2_2415', 1, 1)
end
end

function mob2415_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2415', math.random(1500, 3000), 1)
end

function mob2415_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2415_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2415_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2415, 1, 'mob2415_Action')
RegisterUnitEvent(2415, 2, 'mob2415_Leave')
RegisterUnitEvent(2415, 3, 'mob2415_Kill')
RegisterUnitEvent(2415, 4, 'mob2415_Die')
